forum

home / developersection / forums / two timers in one page

Two timers in one page

Anonymous User 2106 16-Dec-2013

I have two timers in one page but second timer is not working.

<asp:Timer ID="Timer1" runat="server" Interval="1000" OnTick="Timer1_Tick">
</asp:Timer>
<asp:Timer ID="Timer2" runat="server" Interval="5000" OnTick="Timer2_Tick">
</asp:Timer>
Code behind:
protected void Timer1_Tick(object sender, EventArgs e)
{
    lblcurrenttime5.Text = DateTime.Now.ToLongTimeString();
}      
protected void Timer2_Tick(object sender, EventArgs e)
{
    label6.Text ="Timer 2 is working";


Updated on 16-Dec-2013

I am a content writter !


Message
Can you answer this question?

Answer

1 Answers

Liked By